//
//  SingerSongTableViewCell.m
//  MusicPlayer
//
//  Created by 李欢 on 15/5/25.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SingerSongTableViewCell.h"
#define Width [UIScreen mainScreen].bounds.size.width
#define Height [UIScreen mainScreen].bounds.size.height
@implementation SingerSongTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)dealloc
{
    [_name release];
    [_singerName release];
    [_image release];
    [_aimage release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        UIImage * im = [UIImage imageNamed:@"背景.jpg"];
        self.image = [[UIImageView alloc]initWithFrame:CGRectMake(20/375.0*Width, 15/667.0*Height, 50/375.0*Width, 50/667.0*Height)];
        self.image.layer.cornerRadius = 9/375.0*Width;
        //            图片变成圆形
        self.image.layer.cornerRadius = 9/375.0*Width;
        self.image.clipsToBounds = YES;
        [self.image setImage:im];
        [self.contentView addSubview:self.image];
        [self.image release];
        
        self.name = [[UILabel alloc]initWithFrame:CGRectMake(100/375.0*Width, 10/667.0*Height, 170/375.0*Width, 40/667.0*Height)];
        self.name.font = [UIFont systemFontOfSize:18/375.0*Width];
        [self.contentView addSubview:self.name];
        [self.name release];
        
        self.singerName = [[UILabel alloc]initWithFrame:CGRectMake(100/375.0*Width, 45/667.0*Height, 170/375.0*Width, 30/667.0*Height)];
        self.singerName.font = [UIFont systemFontOfSize:14/375.0*Width];
        [self.contentView addSubview:self.singerName];
        [self.singerName release];
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
